// Copyright (C) joyinter
// All rights reserved.
// 
// Author : Jiang Li
// Date   : 2004-6-24

#ifndef __HTMLVIEW_H_COMMON_UI__
#define __HTMLVIEW_H_COMMON_UI__

#pragma once

#include "afxhtml.h"
#include "wndcontainer.h"

//##ModelId=44CF17B800AC
class CJoyHtmlView :
    public CHtmlView
{
	DECLARE_DYNCREATE(CJoyHtmlView)
protected:
	//##ModelId=44CF17B800AE
    bool    m_showScroll;

	//##ModelId=44CF17B800AF
    void ValidateBrowserSize(int cx, int cy);
public:
	//##ModelId=44CF17B800BD
    CJoyHtmlView(void);
	//##ModelId=44CF17B800BF
    virtual ~CJoyHtmlView(void);

	//##ModelId=44CF17B800C2
    void ShowScroll(bool show);

public:

public:
	DECLARE_MESSAGE_MAP()
	//##ModelId=44CF17B800C4
    afx_msg void OnSize(UINT nType, int cx, int cy);
	//##ModelId=44CF17B800CE
    afx_msg BOOL OnEraseBkgnd(CDC* pDC);
};

//##ModelId=44CF17B800D1
class CJoyHtmlPanel : public CJoyWndContainer
{
	DECLARE_DYNAMIC(CJoyHtmlPanel)
protected:
	//##ModelId=44CF17B800DC
    CJoyHtmlView*    m_htmlView;

public:
	//##ModelId=44CF17B800E0
    CJoyHtmlPanel(void);
	//##ModelId=44CF17B800E2
    virtual ~CJoyHtmlPanel(void);

	//##ModelId=44CF17B800EB
    bool Create(CJoyWnd* parent, const CRect& area);

	//##ModelId=44CF17B800EE
    CJoyHtmlView* GetHtmlView() const
    {
        return m_htmlView;
    }

public:
	DECLARE_MESSAGE_MAP()
	//##ModelId=44CF17B800F0
    afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	//##ModelId=44CF17B800F3
    afx_msg void OnDestroy();
};

#endif  // __HTMLVIEW_H_COMMON_UI__
